<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <include file="Inc/basic_css"/>
    <include file="Inc/basic_js"/>
    <import type="js" basepath="__JS__" file="AjaxFileUpload,imgpre,admin" />
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
<!-- BEGIN HEADER -->
<include file="Inc/head"/>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container">
    <!-- BEGIN SIDEBAR -->
    <include file="Inc/left"/>
    <!-- END SIDEBAR -->
    <!-- BEGIN PAGE -->
    <div class="page-content">

        <!-- BEGIN STYLE CUSTOMIZER -->
        <include file="Inc/theme"/>
        <!-- END BEGIN STYLE CUSTOMIZER -->
        <!-- BEGIN PAGE HEADER-->
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                <h3 class="page-title">
                    系统管理 <small></small>
                </h3>
                <ul class="page-breadcrumb breadcrumb">
                    <li><i class="fa fa-home"></i><a href="#">系统管理</a> <i class="fa fa-angle-right"></i></li>
                    <li><a href="#">权限管理</a><i class="fa fa-angle-right"></i></li>
                    <li><a href="#">编辑权限组</a></li>
                </ul>                   <!-- END PAGE TITLE & BREADCRUMB-->
            </div>
        </div>
        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                <div class="portlet">
                    <!--
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-reorder"></i>站点信息
                        </div>
                    </div>-->
                    <form class="form-horizontal" action="{:U('User/powerSave')}"   id="submit_form">
                        <input type="hidden" name="back_url" value="{$back_url}">
                        <input type="hidden" name="id" value="{$dataInfo.id}" />
                        <div class="portlet-body form">
                            <!-- BEGIN FORM-->

                            <div class="form-body">
                                <div class="form-group">
                                        <label class="col-md-3 control-label">权限组名：</label>
                                        <div class="col-md-4">
                                        <input type="text" class="form-control" id = "group_name" name="group_name" value="{$dataInfo.group_name}" />                                       
                                        </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-md-3 control-label">分配权限：</label>

                                    <div class="col-md-4">
                                  <if condition="$m_id eq 1">
                                        <foreach name="subNav" item="one" key="a" >
                                          <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#e9e9e9">
                                        <tr>
                                              <td width="15%" height="35" bgcolor="#f0f0f0" align="center">
                                                  <label>
                                                  {$one.navTitle}
                                                  <input type="checkbox" name="group_keys[]" id="parent_{$a}" value="{$a}" onclick="javascript:showCheck('{$a}',this.checked);" 
                                                  <in name="a" value="$dataInfo['group_keys']">checked</in> />
                                                </label>                  </td>
                                                  <td width="85%" bgcolor="#FFFFFF">
                                                    <table width="100%" border="0">
                                                      <foreach  name="one.secNav" item="two" key="b">
                                                            <tr>
                                                              <td height="35" bgcolor="#FFFFFF">
                                                              <label>
                                                              {$two.secTitle}
                                                              <input type="checkbox" name="group_keys[]" value="{$b}" class="child_check_{$a}" onclick="javascript:checkParent('{$a}');" 
                                                              <in name="b" value="$dataInfo['group_keys']">checked</in> />
                                                              </label>
                                                              </td>
                                                        </tr>  
                                                      </foreach>  
                                                    </table>
                                              </td>
                                            </tr>
                                          </table>   
                                            <p style=" height:10px"></p>
                                        </foreach> 
                                        <else />
                                        <foreach name="subNav" item="one" key="a" >
                                        <table width="100%" border="0" bgcolor="#e9e9e9">
                                      <in name="a" value="$group_keys">
                                              <tr>
                                                <td width="15%" height="35" align="center" bgcolor="#f0f0f0">
                                                <label>
                                                {$one.navTitle}
                                                <input type="checkbox" name="group_keys[]" id="parent_{$a}" value="{$a}" onclick="javascript:showCheck('{$a}',this.checked);" <in name="a" value="$dataInfo['group_keys']">checked</in> />
                                                </label>                      </td>
                                                <td width="85%" bgcolor="#ffffff">
                                                  <table width="100%" border="0">
                                                    <foreach  name="one.secNav" item="two" key="b">
                                                       <in name="b" value="$group_keys">
                                                          <tr>
                                                            <td height="35" bgcolor="#FFFFFF">
                                                            <label>
                                                            {$two.secTitle}
                                                            <input type="checkbox" name="group_keys[]" value="{$b}" class="child_check_{$a}" onclick="javascript:checkParent('{$a}');" 
                                                            <in name="b" value="$dataInfo['group_keys']">checked</in> />
                                                            </label>
                                                            </td>
                                                         </tr>
                                                       </in>   
                                                    </foreach>  
                                                  </table>
                                                </td>
                                            </tr>
                                          </in>
                                        </table>
                                        
                                           <p style=" height:10px"></p>
                                           
                                      </foreach>  
                                      
                                    </if>
                                    </div>

                                </div>

                            </div>
                        </div>
                        <div class="form-actions top fluid ">
                            <div class="col-md-offset-3 col-md-9">
                                <button class="btn green" type="submit">提交</button>
                                <button class="btn default" type="button" id="cancel" onclick="history.go(-1)">返回</button>
                            </div>
                        </div>
                    </form>
                    <!-- END FORM-->



                </div>
            </div>
            <!-- END EXAMPLE TABLE PORTLET-->
        </div>
    </div>
    <!-- END PAGE CONTENT -->
</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<include file="Inc/foot"/>
<!-- END FOOTER -->
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->


<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script src="__JS__/app.js" type="text/javascript"></script>
<script src="__JS__/controllers/user/index_edit.js" type="text/javascript"></script>
<!-- END PAGE LEVEL SCRIPTS -->
<script>
    jQuery(document).ready(function() {
        App.init(); // initlayout and core plugins
        NewValidation.init();
    });
</script>
<!-- END PAGE LEVEL SCRIPTS -->

</body>
<!-- END BODY -->
</html>